package com.aya.aop.custom.afterthrow.pointcut;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.ThrowsAdvice;

import java.lang.reflect.Method;

public class MyThrowsAdvice implements ThrowsAdvice {
    private static final Logger logger = LoggerFactory.getLogger(MyThrowsAdvice.class);
    public void afterThrowing(Method method, Object[] args, Object target, Throwable ex) {
        logger.info("throwing, class:{},method:{}", target.getClass().getName(), method.getName());

    }
}
